using System;
using System.Collections.Generic;

namespace Nop.Core.Domain.XJ
{
	/// <summary>
	/// 设施设备
	/// </summary>
	public class XJEquipment : BaseEntity
	{
		private ICollection<XJPlace> _xJPlaces;
		/// <summary>
		/// 主分类：设施设备、配件
		/// <see cref="CategoryMainEnum"/>
		/// </summary>
		public int CategoryMainId { get; set; }
		/// <summary>
		/// 分类
		/// <see cref="XJEquipmentCategory"/>
		/// </summary>
		public int CategoryId { get; set; }
		/// <summary>
		/// 父ID
		/// </summary>
		public int PId { get; set; }
		/// <summary>
		/// 名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 单价
		/// </summary>
		public decimal Price { get; set; }
		/// <summary>
		/// 平均使用寿命
		/// </summary>
		public int MeanLife { get; set; }
		/// <summary>
		/// 品牌
		/// </summary>
		public string Manufacturer { get; set; }
		/// <summary>
		/// 规格型号
		/// </summary>
		public string Specification { get; set; }
		/// <summary>
		/// 单位
		/// </summary>
		public string Unit { get; set; }
		/// <summary>
		/// 排序
		/// </summary>
		public int DisplayOrder { get; set; }
		/// <summary>
		/// 最小库存数量
		/// </summary>
		public int StockMin { get; set; }
		/// <summary>
		/// 当前库存数量
		/// </summary>
		public int Stock { get; set; }
		/// <summary>
		/// 冻结数量
		/// 待审核领用申请数量
		/// </summary>
		public int Freeze { get; set; }
		/// <summary>
		/// 使用中数量
		/// 领用申请审核后生成XJEquipmentStock记录（一对多：领用n个，生成n条）
		/// </summary>
		public int UseIn { get; set; }
		/// <summary>
		/// 创建人
		/// </summary>
		public int CustomerId { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreatedOn { get; set; }
		/// <summary>
		/// 是耗材；否则，设施设备
		/// </summary>
		public bool IsConsumables { get; set; }
		/// <summary>
		/// 发布
		/// </summary>
		public bool Published { get; set; }
		/// <summary>
		/// 标记删除
		/// </summary>
		public bool Deleted { get; set; }
		/// <summary>
		/// 巡检点
		/// </summary>
		public virtual ICollection<XJPlace> Places
		{
			get { return _xJPlaces ?? (_xJPlaces = new List<XJPlace>()); }
			protected set { _xJPlaces = value; }
		}
	}
}
